package com.yuuko.yuukoapi.project.limb.doman.entity

import com.yuuko.yuukoapi.common.utils.UUIDGenerator
import com.yuuko.yuukoapi.model.base.BaseEntity
import org.babyfish.jimmer.sql.Column
import org.babyfish.jimmer.sql.Entity
import org.babyfish.jimmer.sql.GeneratedValue
import org.babyfish.jimmer.sql.Id
import org.babyfish.jimmer.sql.IdView
import org.babyfish.jimmer.sql.JoinColumn
import org.babyfish.jimmer.sql.JoinTable
import org.babyfish.jimmer.sql.Key
import org.babyfish.jimmer.sql.ManyToMany
import org.babyfish.jimmer.sql.ManyToOne
import org.babyfish.jimmer.sql.OneToMany
import org.babyfish.jimmer.sql.Table
/**
 * <p>
 *  device_model

 * </p>
 *
 * @author yuuko
 * @date 2025-06-23
 */
@Entity
@Table(name = "device_model")
interface DeviceModel : BaseEntity {

    /**
     *  id

     */
    @Id
    @GeneratedValue(generatorType = UUIDGenerator::class)
    val id: String

    /**
     *  name

     */
    val name: String

    /**
     *  code

     */
    @Key
    val code: String?

    /**
     *  description

     */
    val description: String?

    @OneToMany(mappedBy = "model")
    val devices: List<Device>

    @ManyToMany(mappedBy = "models")
    val firmwares: List<DeviceFirmware>

    @ManyToMany(mappedBy = "models")
    val params: List<DeviceParam>

}